home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2002 November / CD 1 / APC0211D1.ISO / workshop / prog / files / ActivePerl-5.6.1.633-MSWin32.msi / _24085dea866ff1c7df097d52c72bc7b7 < prev    next >
Encoding:
Text File  |  2002-05-30  |  4.6 KB  |  166 lines

  1.  
  2. =head1 NAME
  3.  
  4. Tk::NoteBook - display several windows in limited space with notebook metaphor.
  5.  
  6. =for pm Tixish/NoteBook.pm
  7.  
  8. =for category Tix Extensions
  9.  
  10. =head1 SYNOPSIS
  11.  
  12.   use Tk::NoteBook;
  13.   ...
  14.   $w = $frame->NoteBook();
  15.   $page1 = $w->add("page1", options);
  16.   $page2 = $w->add("page2", options);
  17.   ...
  18.   $page2 = $w->add("page2", options);
  19.  
  20. =head1 DESCRIPTION
  21.  
  22. The NoteBook widget provides a notebook metaphor to display several
  23. windows in limited space. The notebook is divided into a stack of pages
  24. of which only one is displayed at any time. The other pages can be
  25. selected by means of choosing the visual "tabs" at the top of the
  26. widget. Additionally, the <Tab> key may be used to traverse the pages.
  27. If B<-underline> is used, Alt- bindings will also work.
  28.  
  29. The widget takes all the options that a Frame does. In addition,
  30. it supports the following options:
  31.  
  32. =over 4
  33.  
  34. =item B<-dynamicgeometry>
  35.  
  36. If set to false (default and recommended), the size of the NoteBook
  37. will match the size of the largest page. Otherwise the size will
  38. match the size of the current page causing the NoteBook to change
  39. size when different pages of different sizes are selected.
  40.  
  41. =item B<-ipadx>
  42.  
  43. The amount of internal horizontal padding around the pages.
  44.  
  45. =item B<-ipady>
  46.  
  47. The amount of internal vertical padding around the pages.
  48.  
  49. =back
  50.  
  51. =head1 METHODS
  52.  
  53. The following methods may be used with a NoteBook object in addition
  54. to standard methods.
  55.  
  56. =over 4
  57.  
  58. =item B<add(>I<pageName>, I<options>B<)>
  59.  
  60. Adds a page with name I<pageName> to the notebook. Returns an object
  61. of type B<Frame>. The recognized I<options> are:
  62.  
  63. =over 4
  64.  
  65. =item B<-anchor>
  66.  
  67. Specifies how the information in a tab is to be displayed. Must be
  68. one of B<n>, B<ne>, B<e>, B<se>, B<s>, B<sw>, B<w>, B<nw> or
  69. B<center>.
  70.  
  71. =item B<-bitmap>
  72.  
  73. Specifies a bitmap to display on the tab of this page. The bitmap
  74. is displayed only if none of the B<-label> or B<-image> options
  75. are specified.
  76.  
  77. =item B<-image>
  78.  
  79. Specifies an image to display on the tab of this page. The image
  80. is displayed only if the B<-label> option is not specified.
  81.  
  82. =item B<-label>
  83.  
  84. Specifies the text string to display on the tab of this page.
  85.  
  86. =item B<-justify>
  87.  
  88. When there are multiple lines of text displayed in a tab, this
  89. option determines the justification of the lines.
  90.  
  91. =item B<-createcmd>
  92.  
  93. Specifies a L<callback|Tk::callbacks> to be called the first time the page is
  94. shown on the screen. This option can be used to delay the creation
  95. of the contents of a page until necessary. It can be useful in
  96. situations where there are a large number of pages in a NoteBook
  97. widget; with B<-createcmd> you do not have to make the user wait
  98. until all pages are constructed before displaying the first page.
  99.  
  100. =item B<-raisecmd>
  101.  
  102. Specifies a L<callback|Tk::callbacks> to be called whenever this page is raised
  103. by the user.
  104.  
  105. =item B<-state>
  106.  
  107. Specifies whether this page can be raised by the user. Must be
  108. either B<normal> or B<disabled>.
  109.  
  110. =item B<-underline>
  111.  
  112. Specifies the integer index of a character to underline in the
  113. tab. This option is used by the default bindings to implement
  114. keyboard traversal for menu buttons and menu entries. 0
  115. corresponds to the first character of text displayed on the
  116. widget, 1 to the next character and so on.
  117.  
  118. =item B<-wraplength>
  119.  
  120. This option specifies the maximum line length of the label string
  121. on this tab. If the line length of the label string exceeds this
  122. length, then it is wrapped onto the next line so that no line is
  123. longer than the specified length. The value may be specified in
  124. any standard forms for screen distances. If this value is less
  125. than or equal to 0, then no wrapping is done: lines will break
  126. only at newline characters in the text.
  127.  
  128. =back
  129.  
  130. =item B<delete(>I<pageName>B<)>
  131.  
  132. Deletes the page identified by I<pageName>.
  133.  
  134. =item B<pagecget(>I<pageName>, I<-option>B<)>
  135.  
  136. Returns the current value of the configuration option given by
  137. I<-option> in the page given by I<pageName>. I<Option> may have any of
  138. the values accepted in the B<add> method.
  139.  
  140. =item B<pageconfigure(>I<pageName>, I<options>B<)>
  141.  
  142. Like configure for the page indicated by I<pageName>. I<Options> may
  143. be any of the options accepted by the B<add> method.
  144.  
  145. =item B<raise(>I<pageName>B<)>
  146.  
  147. Raise the page identified by I<pageName>.
  148.  
  149. =item B<raised()>
  150.  
  151. Returns the name of the currently raised page.
  152.  
  153. =back
  154.  
  155. =head1 AUTHORS
  156.  
  157. B<Rajappa Iyer>  <rsi@earthling.net>
  158. Nick Ing-Simmons <nick@ni-s.u-net.com>
  159.  
  160. This code and documentation was derived from NoteBook.tcl in
  161. Tix4.0 written by Ioi Lam. It may be distributed under the same
  162. conditions as Perl itself.
  163.  
  164. =cut
  165.  
  166.